<?php
use common\rewrites\DmstrWidgetsMenu;
/**
 * @var string $directoryAsset
 */
$user = Yii::$app->user->identity;
$avatarImage = Yii::getAlias('@static_url/images/no-avatar1.png');
?>

<aside class="main-sidebar">
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="<?= $avatarImage ?>" class="img-circle" alt="<?= Yii::t('app', 'user_image') ?>"/>
            </div>
            <div class="pull-left info">
                <p><?=$user->mobile ?></p>
            </div>
        </div>

        <?php /*echo dmstr\widgets\Menu::widget(
            [
                'options' => ['class' => 'sidebar-menu tree', 'data-widget'=> 'tree'],
                'items' => $menuList,
            ]
        )*/ ?>

        <?= DmstrWidgetsMenu::widget(
            [
                'options' => ['class' => 'sidebar-menu tree', 'data-widget'=> 'tree'],
                'items' => [
                    ['label' => '菜单', 'options' => ['class' => 'header']],
                    ['label' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii'], 'visible' => YII_ENV_DEV ? true :false,],
                    ['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug'], 'visible' => YII_ENV_DEV ? true :false,],

                    ['label' => '施工单', 'icon' => 'th', 'url' => ["/buildingOrder"],],
                    ['label' => '产品', 'icon' => 'th',
                        'items' => [
                            ['label' => '列表', 'icon' => '', 'url' => ["/product/product"],],
                        ],
                    ],
                    ['label' => '系统设置', 'icon' => 'th',
                        'items' => [
                            ['label' => '轮播图', 'icon' => '', 'url' => ["/system/banner"],],
                        ],
                    ],

                    /*['label' => '进度', 'icon' => 'th', 'url' => ["/progress"],
                        'visible' => YII_ENV_DEV ? true :false,
                        'items' => [
                            ['label' => '活动跟单', 'icon' => '', 'url' => ["/progress/delivery"],],
                        ],
                    ],*/
                ],
            ]
        ) ?>

    </section>

</aside>
